package com.qk.management.mapper;

import com.qk.entity.Role;
import com.qk.entity.dto.role.RoleDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author fantuan
 * @created 2025/10/8 11:42
 * @description
 */
@Mapper
public interface RoleMapper {
    @Select("select * from role")
    List<Role> list();

    List<Role> selectByPage(RoleDTO dto);

    @Delete("delete from role where id = #{id}")
    void deleteById(Integer id);

    void add(Role role);

    @Select("select * from role where id = #{id}")
    Role getRoleById(Integer id);

    void update(Role role);
}
